package site.xuxingcan.ninecut.View;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

import com.github.gcacace.signaturepad.views.SignaturePad;

/**
 * Created by xuxingcan on 16-5-13.
 */
public class MySignaturePad extends SignaturePad {
    public MySignaturePad(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    private boolean isEnableTouch = true;

    public void setIsEnableTouch(boolean isEnableTouch) {
        this.isEnableTouch = isEnableTouch;
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        if (isEnableTouch) {
            return super.onTouchEvent(event);
        } else {
            return false;
        }
    }
}
